using System;
using System.Collections.Generic;
using System.Linq;
using Granite.DataAnnotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Granite.Commons.Tests.DataAnnotations
{
    [TestClass]
    public class ValidationResultCollectionTests
    {
        [TestMethod]
        public void ValidationResultCollection_Test1()
        {
            var collection = new ValidationResultCollection();
            var result = collection.Add("Test", "FirstName", "LastName");
            Assert.AreEqual("Test", result.ErrorMessage);
            Assert.AreEqual("FirstName", result.MemberNames.ToList()[0]);
            Assert.AreEqual("LastName", result.MemberNames.ToList()[1]);
        }

    }
}
